﻿@{
    ViewBag.Title = "Index";
}
<link rel="stylesheet" type="text/css" href="../../Scripts/css/smoothness/jquery-ui-1.8.16.custom.css" 
  title="coffee" media="screen" />
  <link href="../../Scripts/css/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/src/jqModal.js" type="text/javascript"></script>
<script src="../../Scripts/src/jqDnR.js" type="text/javascript"></script>
<script src="../../Scripts/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="../../Scripts/js/jquery.jqGrid.min.js" type="text/javascript"></script>

<script type="text/javascript">
    jQuery(document).ready(function () {
        
        jQuery("#list").jqGrid({
            url: '/Home/DynamicGridData/',
            datatype: 'json',
            mtype: 'GET',
            colNames: ['Id', 'Votes', 'Title','Body','InsDate'],
            
            colModel: [
          { name: 'Id', index: 'Id', width: 40, align: 'left' },
          { name: 'Votes', index: 'Votes', width: 40, align: 'left' },
          { name: 'Title', index: 'Title', width: 150, align: 'left'},
          { name: 'Body', index: 'Body', width:300, align: 'left'},
          { name: 'InsDate', index: 'InsDate', width: 250, align: 'left'}],
            pager: jQuery('#pager'),
            rowNum: 10,
            rowList: [5, 10, 20, 50],
            sortname: 'Votes',
            sortorder: "desc",
            viewrecords: true,
            imgpath: '/scripts/themes/smoothness/images',
            caption: 'Test grid',
            height: 'auto'
        });

    });

 
</script>



<h2>Index -- @ViewBag.Message</h2>

<h2>My Grid Data</h2>
<table id="list" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>



